import java.util.Scanner;
/**
 * This program accepts a year and computes whether or not it was a leap year. (Homework #2)
 * 
 * @author Tara Gallagher
 *
 */
public class HW02 {

    public static void main(String[] args)
    {
    	
    	int year;
    	
        Scanner input = new Scanner(System.in);
        System.out.print("Please enter a year: ");
        year = input.nextInt();
        input.close();
        if (year < 0){
        	System.out.print("Year must be a positive value.");
        }
        else if (year % 4 == 0 && year %100 != 0) {
            System.out.println(year + " is a leap year!");
        }
        	else if (year %100 == 0 && year %400 == 0) {  
            System.out.println(year + " is a leap year!");
        }
        else {
            System.out.println(year + " is not a leap year.");
            
        }
    }
}
	
	